This invention relates generally to systems for managing the sharing of magnetic tape volumes and similar sequential media or other devices that may require significant setup or repositioning time for use, and more particularly for a method and apparatus for shared media access scheduling for concurrent access by multiple users.
Magnetic tape systems are essentially sequential access devices. That is, in order to read a specific data item, the tape must be positioned along its length to that item. To read a data item in the middle of the tape, the entire first half of the tape must ordinarily be passed, sequentially, before the data item can be read. With tapes capable of containing several thousands of megabytes of data, it can take as long as four or eight hours or more to read or write an entire tape. Repositioning the tape from its beginning to its end does not take as long, since skip operations are available that will allow the tape to go forward or backward at speeds faster than normal reads or writes. Yet it still takes 192 seconds or 3.2 minutes, even to do a high-speed skip from the beginning to the end of a typical 8 mm tape cartridge 112 meters in length. Given the capacity of such tapes, several files can usually be recorded on one cartridge or cassette or reel. Consequently, sharing such a volume so that concurrent application processes or users can access the files tends to improve overall throughput on a system.
Some application-level filesystems such as applicant's Assignee's EBFS Backup File Serve system allow concurrent access to sequential volumes such as magnetic tape or optical media by multiple users. In this kind of system, users are operating on files, without regard to what media or actual volume the files reside on. Thus, it is not desirable or practical for the users to arbitrate among themselves for use of the specific shared media which contains the files. A given user application may execute on one day with two other applications, A & B, and on a subsequent day, the same user application may be executing concurrently with applications B & C. Thus, a user application cannot predict what other applications will be executing at the same time.
A filesystem cannot anticipate a user's future requests, so it cannot reserve access to the media for more than the current request. Therefore, one way to schedule the use of the shared media is to have each user reserve access to the appropriate media volume with each request, and release that reservation at the conclusion of the operation.
If there are multiple users requesting access to the same volume, the users are likely to access the volume in a round robin fashion, with each successive operation coming from a different user. If the users are accessing different parts of the volume, and the cost of moving to a different part of the volume is high, as it is on such sequential media as magnetic tape, or in the case of optical disk "jukeboxes" having multiple disks, or robotic tape systems having multiple tape cassettes, this round-robin access pattern can result in the worst possible performance, as each operation suffers from the cost of repositioning the shared media.
For example, as shown in FIG. 6, if one user, A is reading a file at the beginning 142a of a shared tape volume 142 and a second user, B is writing a new file 142d at the end of that same volume, this round-robin approach could result in user A reading at the beginning of the volume 142a, then user B repositioning it to the new file 142d at the end of the tape to write some data. The next request in a round robin scheme would be from user A, to read at the beginning, 142a. This would require another reposition, and so on. For present day 8 mm tape systems, each reposition of the tape might take an average of 3-5 minutes for 112 meter long tapes. In applicant's Assignee's systems, 8 mm 5 gigabyte tapes are formatted in groups of 2048 records between filemarks. In this system, the average positioning would be half the length of the tape to a filemark, then half the length again to the next filemark. It is estimated that in this format the worst case timing to position to a record is about 320 seconds or approximately 5.3 minutes.
While the concurrently running applications that are sharing the tape are able to proceed, this round-robin-by-default scheduling of their requests may lower throughput and efficiency, if the number of repositions is high. If a tape contains more than 4 files and 4 concurrently running applications are accessing it, each may need to spend 3-5 minutes or more repositioning the tape each time it gets control. In just one "round" of round-robin scheduling, this might represent a waste of 12-15 minutes or more in repositioning time.
Tape robots that manage multiple tape cartridges or cassettes also have significant repositioning times. Exchanges of 8 mm Exabyte tapes usually require 2-3 minutes. Optical disk jukeboxes have significant repositioning times, too. In these, the times required to load and unload a disk vary widely but the fastest drives have a 2 headed picker, that can put away one platter while spinning up a new platter. The more typical ones have to spindown the present disk, put it away, pickup the desired next one, insert it, and spin it up. It can take between 2-30 seconds or more to do all that.
In computer data access, where hard drive accesses and seeks are considered slow if they exceed 20 milliseconds, times that are measured in seconds or minutes are very slow by comparison.
To prevent time lost to media repositioning, another approach is to disallow concurrent access by multiple users requesting access to different parts of the same physical volume. However, for it to be known in advance that users were going to access the same physical media, the users need to be aware of which physical volumes are being accessed. Requiring the users to identify the physical volumes of interest and to reserve access to those volumes creates a significant burden for the users in systems where large numbers of tape or optical volumes may exist for archival storage or database backups, for example.
A third approach to managing concurrent access is to allow multiple users to proceed until a conflict arises over the use of a volume. At this point one user continues while all other users wait until the favored user finishes. Such a system requires the configuration of policies for selecting the favored user, and, without careful consideration on the part of the users, can be subject to deadlock situations in which the favored user is waiting for the completion of one of the waiting users.
It is an object of the present invention to provide a method and apparatus for scheduling access to shared media by concurrent users that reduces time lost by delays due to repeated setup or repositioning.
It is another object of the present invention to provide a method and apparatus for scheduling access to shared media by concurrent users without requiring the users to keep track of physical volume identities.
Still another object of the present invention is providing shared media access scheduling that does not increase the likelihood of deadlocks occurring.
Yet another object of the present invention is providing shared media access scheduling by concurrent users that does not require special access policies for determining priority of the users for access to the shared media.